package com.ruoyi.activity.service;

import com.ruoyi.activity.dto.FlowApproveDto;
import com.ruoyi.common.core.page.TableDataInfo;
import org.activiti.bpmn.model.UserTask;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.rmi.ServerException;
import java.util.List;

public interface IFlowService {

    /**
     * 开始流程
     * @param businessId 业务数据ID
     * @param businessKey 业务标识
     * @return
     */
    String start(Long businessId, String businessKey) throws Exception;

    /**
     * 审批通过
     */
    void pass(FlowApproveDto flowApproveDto) throws ServerException;

    List<UserTask> getNextTaskNode(String taskId, Integer outcome);

    List<UserTask> getNextTaskNodeByActivityId(String businessId) throws ServerException;

    void endProcess(FlowApproveDto flowApproveDto) throws Exception;

    TableDataInfo getlist(String key, String name, Boolean latest, Integer pageSize, Integer pageNum);

    void showresource(String pdid, HttpServletResponse response) throws IOException;

    void getPictiue(String pdid, String flowId) throws IOException, Exception;

    byte[] getProcessInstanceImage(String instanceId);

    void withdraw(Long businessId) throws ServerException;

    UserTask currentNodeByFlowId(String flowId) throws ServerException;
}
